-- GENERATED SPELL FOR [Blackwood Shaman] --


function spell0_2171(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(913,pUnit)
pUnit:RegisterEvent('Sorts_2171', 3000, 1)
end

function spell1_2171(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2171', 3000, 1)
end

function spell2_2171(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(2606,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2171', 0, 1)
end

function Sorts_2171(pUnit, Event)
local choix_sorts_2171 = math.random(0, 2)
if choix_sorts_2171 == 0 then
pUnit:RegisterEvent('spell0_2171', 1, 1)
end
if choix_sorts_2171 == 1 then
pUnit:RegisterEvent('spell1_2171', 1, 1)
end
if choix_sorts_2171 == 2 then
pUnit:RegisterEvent('spell2_2171', 1, 1)
end
end

function mob2171_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2171', math.random(1500, 3000), 1)
end

function mob2171_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2171_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2171_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2171, 1, 'mob2171_Action')
RegisterUnitEvent(2171, 2, 'mob2171_Leave')
RegisterUnitEvent(2171, 3, 'mob2171_Kill')
RegisterUnitEvent(2171, 4, 'mob2171_Die')
